package com.njbdqn.mybuy.test;

import java.util.Date;

import com.njbdqn.mybuy.entity.Buy;
import com.njbdqn.mybuy.entity.Userinfos;
import com.njbdqn.mybuy.services.BuyService;

public class Demo {
	public static void main(String[] args) {
		Buy buy = new Buy();
		buy.setBuyno(1);
		buy.setUser(new Userinfos(1,"aa","123",new Date()));
		buy.setBuydate(new Date());
		
		BuyService bs = new BuyService(buy);
		bs.addShop(1,10);
		bs.addShop(2,5);
		bs.addShop(1,2);
		System.out.println(buy.getShops());
		bs.delShop(1);
		System.out.println(buy.getShops());
		
		
	}
}
